<template>
  <div>
    <el-menu
        class="el-menu-vertical-demo"
        @select="selectNav"
        v-for="(menu,index) in menuData">
      <el-submenu v-if="menu.menusType==0" :index="index+''">
        <span slot="title"><i :class="menu.menusIcon"></i>{{menu.menusName}}</span>
        <el-menu-item-group>
          <menus :menuData="menu.menuDtos"></menus>
        </el-menu-item-group>
      </el-submenu>

      <el-menu-item v-if="menu.menusType==1" :index="menu.menusRouter">

        <span slot="title"><i :class="menu.menusIcon"></i>{{menu.menusName}}</span>
      </el-menu-item>

    </el-menu>


  </div>

</template>

<script>
export default {
  name: "menus",
  props:["menuData"],


  methods: {
    selectNav(index) {
      this.$router.push(index);
    },
  }
}
</script>

<style scoped>

</style>